package estacion.dominio;

import java.util.Vector;

import estacion.persistencia.FPTaxi;


public class Taxi extends Vehiculo{

	public Taxi(){
		super();
	}
	
	public double precioruta(){		
		return Math.random()*100;
	}

	@Override
	public void insertarVehiculo() throws Exception {
		 FPTaxi.insertTaxi(this);
		
	}

	@Override
	public void eliminarVehiculo(String codigo) throws Exception {
		 FPTaxi.deleteTaxi(codigo);
		
	}

	@Override
	public Vehiculo consultarVehiculo(String codigo) throws Exception {
		return FPTaxi.consultTaxi(codigo);
	}

	@Override
	public void modificarVehiculo() throws Exception {
		FPTaxi.modificarTaxi(this, this.Codigo_vehiculo);
		
	}

	@Override
	public Vector<Vehiculo> getVehiculos() throws Exception {
		return FPTaxi.getTaxis();
	}
	
	
}
